import numpy as np

from sklearn import metrics
from sklearn.metrics import classification_report

# y_pred = [0, 2, 1, 3, 8]
#
# y_true = [0, 1, 2, 3, 9]

y_true = [0, 1, 2, 2, 2]
y_pred = [0, 0, 2, 2, 1]

print(np.unique(y_true))
# result = accuracy_score(y_true,y_pred)
#
# print(result)
#
# acc_result = accuracy_score(y_true,y_pred,normalize=False)

# print("acc_result-normalize:",acc_result)


target_names = ['class 0', 'class 1', 'class 2']
print(classification_report(y_true, y_pred, target_names=target_names))


# from sklearn.metrics import classification_report
# y_true = [0, 1, 2, 2, 2]
# y_pred = [0, 0, 2, 2, 1]
# target_names = ['class 0', 'class 1', 'class 2']
# print(classification_report(y_true, y_pred, target_names=target_names))


